﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:s="clr-namespace:System;assembly=mscorlib" >


	<!-- ****** GraphicRadioButtonStyle ****** -->
	<Style x:Key="GraphicRadioButtonStyle" TargetType="{x:Type RadioButton}">
		<Setter Property="Background" Value="#7F055Aaa" />
		<Setter Property="TextBlock.Foreground" Value="AliceBlue" />
		<Setter Property="TextBlock.VerticalAlignment" Value="Center" />

		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RadioButton}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="Storyboard1">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
								<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="Storyboard2">
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
								<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>

					<Border Opacity="1" x:Name="border1" Background="{x:Null}" BorderBrush="#FFF2DB8B" BorderThickness="1" CornerRadius="4">
						<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="Gray" BorderThickness="1" CornerRadius="4">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="0.5*"/>
									<RowDefinition Height="0.5*"/>
								</Grid.RowDefinitions>

								<Border Opacity="0" Margin="0,0,0,0" x:Name="glow" Grid.RowSpan="2" CornerRadius="4,4,4,4">
									<Border.Background>
										<RadialGradientBrush>
											<RadialGradientBrush.RelativeTransform>
												<TransformGroup>
													<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.383" ScaleY="2.33"/>
													<SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
													<RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
													<TranslateTransform X="-0.006" Y="0.299"/>
												</TransformGroup>
											</RadialGradientBrush.RelativeTransform>
											<GradientStop Color="#B2FFDE00" Offset="0" />
											<GradientStop Color="#0091BEFA" Offset="1" />
										</RadialGradientBrush>
									</Border.Background>
								</Border>

								<StackPanel Grid.RowSpan="2" Orientation="Horizontal">
									<Image x:Name="img_Pressed" Source="/Resources/RadioButtonSelected_256.png" Width="15" Height="15" Margin="2"
										   Visibility="Hidden" />

									<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
													  VerticalAlignment="Center"
													  Margin="{TemplateBinding Padding}" />
								</StackPanel>

								<Border HorizontalAlignment="Stretch" x:Name="shine" CornerRadius="4,4,0,0">
									<Border.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#99FFFFFF" Offset="0" />
											<GradientStop Color="#33FFFFFF" Offset="1" />
										</LinearGradientBrush>
									</Border.Background>
								</Border>
							</Grid>
						</Border>
					</Border>



					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Opacity" TargetName="border" Value="0.15"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="Storyboard2_BeginStoryboard" Storyboard="{StaticResource Storyboard1}"/>
							</Trigger.EnterActions>
							<Trigger.ExitActions>
								<BeginStoryboard x:Name="Storyboard2_BeginStoryboard1" Storyboard="{StaticResource Storyboard2}"/>
							</Trigger.ExitActions>
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Visibility" TargetName="glow" Value="Hidden"/>
							<Setter Property="Background" TargetName="border" Value="#7F055A91"/>
							<Setter Property="Opacity" TargetName="shine" Value="0.4"/>
						</Trigger>
						<Trigger Property="IsChecked" Value="True">
							<Setter Property="Visibility" TargetName="img_Pressed" Value="Visible" />
							<Setter Property="TextBlock.FontWeight" Value="Bold" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>